package com.cb.spzx.manager.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cb.spzx.model.dto.h5.UserResetPwdDto;
import com.cb.spzx.model.dto.system.AssginRoleDto;
import com.cb.spzx.model.dto.system.LoginDto;
import com.cb.spzx.model.dto.system.SysUserDto;
import com.cb.spzx.model.entity.system.SysUser;
import com.cb.spzx.model.vo.system.LoginVo;

/**
* @author lenovo
* @description 针对表【sys_user(用户表)】的数据库操作Service
* @createDate 2024-04-09 17:29:58
*/
public interface SysUserService extends IService<SysUser> {
    // 根据用户名查询用户数据
    LoginVo login(LoginDto loginDto);

    // 获取登录用户信息
    SysUser getUserInfo(String token);

    // 用户退出
    void logout(String token);

    //分页查询用户信息
    IPage<SysUser> findByPage(SysUserDto sysUserDto, Page<SysUser> sysUserPage);

    int saveSysUser(SysUser sysUser);

    int updateSysUser(SysUser sysUser);

    int deleteById(Long userId);

    void doAssign(AssginRoleDto assginRoleDto);

    void updateInfo(SysUser sysUser,String token);

    void resetPwd(UserResetPwdDto userResetPwdDto);
}
